package com.zareal.feign;

import com.zareal.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-product",fallbackFactory = ProductFeignClientFallbackFactory.class)
public interface ProductFeignClient {
    /**
     * 查询所有对象
     */
    @RequestMapping(value = "/product/list",method = RequestMethod.GET)
    JSONResult list();

    @RequestMapping(value = "/product/{id}",method = RequestMethod.GET)
    JSONResult get(@PathVariable("id")Long id);

}
